<?php
namespace app\index\controller;
use app\index\model\BannerModel;
use app\index\model\TripCateModel;
use app\index\model\TripModel;
use think\Controller;
use think\Db;
class Index extends Controller
{
    public function index()
    {
        //返回banner图
        $banner = new BannerModel();
        $bannerList = $banner->getBannerList();
        $this->assign('bannerList',$bannerList);

        //返回分类
        $cate = new TripCateModel();
        $tripCate = $cate->getTripCate();

        $this->assign('tripCate',$tripCate);

        //返回推荐行程
        $trip = new TripModel();
        $tripRecom = $trip->getTripRecom();
        $this->assign('tripRecom',$tripRecom);

        //返回精品行程
        $trip = new TripModel();
        $tripJp = $trip->getTripJp();
        $this->assign('tripJp',$tripJp);

        //返回最新行程
        $trip = new TripModel();
        $tripNew = $trip->getNewTrip();
        $this->assign('tripNew',$tripNew);
       return $this->fetch();
    }
}
